杭州电子科技大学的离线版OJ,可用于断网情况下练习ACM
杭州电子科技大学的离线版OJ,可用于断网情况下练习ACM
杭电OJ(1000-1099) AC 代码
codj,hdoj的源码(50-60题)
杭电oj4405,一道简单的概率dp题目
标签: C++
:party_popper: 解决方案_For_Leetcode&Codewars这个仓库里的转移涉及到多个标签和多个oj,以标签为一级分界,以oj为二级分界。 更新:2021-03-20 :ship:内容译文描述译文答案(源代码)思路和题解(包括difficulty...
HDOJ_1004 Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges’ favorite time is guessing the most popular problem. When the...
题目:In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + … + n.Input 杭电OJ1001
#include<stdio.h> #include<math.h> #define PI 3.1415927 int main() { double r; while(scanf("%lf",&r)!=EOF){ printf("%.3lf\n"...
Problem Description In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + … + n.Input The input will consist of a series of integers n, one integer per lineOutput For each case, output SUM...
题目:I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. HDOJ1002,易错点,解题思路。
题目:A number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the value of f(n). 杭电oj1005
杭电oj2005, 题目: 给定一个日期,输出这个日期是该年的第几天。Input 输入数据有多组,每组占一行,数据格式为YYYY/MM/DD组成
题目:Given a sequence a[1],a[2],a[3]……a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5...杭电oj_1003_max sum
HDOJ_1004_Let the Balloon Rise
杭电OJ题目源码记录 —— a source code of hdoj acm problem archive 简介 此项目为 的 题目以及代码仓库 src 中每一个文件夹代表一个题目 每个文件夹中都有 原题文档介绍.md 原题文档介绍.md 是工具自动生成 (无聊...
A+B for Input-Output Practice (VIII) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description Your task is to calculate the sum of some integers. ...
本题用到贪心策略和结构体排序。 问题简化:现有资本M,N个房间,第i个房间对应着价格为F[i]和收益J[i],需要将M全部花光去投资每个房间,使得收益最大,从每个房间中获取的效益与投入成正比,求最大获益。...
Problem Description Given a positive integer n, find the positions of all 1’s in its binary representation. The position of the least significant bit is 0.ExampleThe positions of 1’s in the binary ...
根据题目意思,现将字符串转化为10进制,再采用10进制加法相加,再转化为26进制. 另一种直接的思路是:采用26进制,模拟加法过程. ...思路:用字符串存储两个26进制的数,然后在前面补A(相当于十进制中的0),使...
【1004】
OJ_Tempter of the BoneProblem Description The doggie found a bone in an ancient maze, which fascinated him a lot.However, when he picked it up, the maze began to shake, and the doggie could feel the ...
题目:... 题目理解:给出一个口袋的容量,若干种宝物的单价和体积,单个的宝物可以分割,待求的是最多能装价值多少的宝物. ...思路:宝物可以分割,所以如果宝物足够多的话,口袋可以装满....装
OJ_Prime Ring ProblemProblem Description A ring is compose of n circles as shown in diagram.Put natural number 1, 2, …, n into each circle separately, and the sum of numbers in two adjacent circles ...
思路:贪心法.要求在浓度不超标的情况下,解药的最大体积.由于体积相同,可以先对浓度排序,然后从浓度小的药水开始配制,直到超标的前一次,就可以求出最大体积和对应的不超标的最大浓度. ...
Problem Description FJ is surveying his herd to find the most average cow.He wants to know how much milk this ‘median’ cow gives : half of the cows give as much or more than the median;...
题意:从给定的几个元素选择出符合5个组成一个组合,输出字典序的最后一个符合要求的组合,如果不存在符合要求的组合,则输出"no solution". 从若干元素中选择出5个元素,初看是组合问题,其实不是,因为组合...
标签: 水题
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2004 //C++代码 #include using namespace std; int main(){ int n; while(cin>>n){ if(n100) cout!... else if(n>=90) cout<<"A"<
#include&lt;stdio.h&gt; #define NUM 100 int main(){ int i,n,t,q,temp,min,a[NUM]; while(scanf("%d",&amp;n)!=EOF){ if(n==0) continue; for(i=0;i&lt;n;......
#include&lt;stdio.h&gt; #include&lt;math.h&gt; int main(){ int i,j,temp,n; int a[110]; while(scanf("%d",&amp;n),n){ for(i=0;i&lt;n;i++){ scanf("... ...
#include&lt;stdio.h&gt; int main() { int i,n,m; while(scanf("%d",&amp;n)!=EOF){ m=1; for(i=1;i&lt;n;i++){ m=2*(m+1); } printf("%d\n",m);...}